<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="../../../commons/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>药品盘点</title>
<link rel="stylesheet" href="${ctx}/static/css/pintuer.css">
    <link rel="stylesheet" href="${ctx}/static/css/admin.css">
    <script src="${ctx}/static/js/jquery.js"></script>
    <script src="${ctx}/static/js/pintuer.js"></script> 
</head>
<body>
	<div class="panel admin-panel">
		<div class="panel-head">
			<!-- <strong class="icon-reorder"> 挂号管理</strong> -->
			<select name="copynum" style="padding:5px 15px; border:1px solid #ddd;" onchange="change(this.value)">
            <option value="1">打印核算表</option>
            <option value="2" selected="selected">实盘数录入</option>
            <option value="3">盘盈盘亏单</option>
            <option value="4">打印盘点数</option>
          	</select>
			<div style="float: right;">
			    <a class="button border-main" href="inventory1add"> 新增</a>
				<!-- <button class="button border-main excel" type="submit"> 导出Excel</button> -->
			    <a class="button border-main" href="inventory1"> 刷新</a>
			</div>
			<div style="clear: both;"></div>
		</div>
		<div class="padding border-bottom">
			<form method="post" action="su_serach">
				<ul class="search" style="padding-left:10px;">
					<li>
						<input type="text" class="input" value="" id="search" placeholder="名称搜索" />
					</li>
					<li>
						<button class="button border-main" type="submit"> 查询</button>
					</li>
					<li>
						<a href="inventory">清除搜索</a>
					</li>
				</ul>
			</form>
		</div>
		<table class="table table-hover text-center">
		<tr>
			<th width="15%" style="text-align: center;"> 操作</th>
			<th style="text-align: center;" width="14%">盘点单号</th>
			<th style="text-align: center;">盘点日期</th>
			<th style="text-align: center;">单据状态</th>
		</tr>
		<c:forEach items="${suadd }" var="list">
			<tr>
				<td style="border-bottom: 1px solid #ddd;"><a style="cursor: pointer;" href="inventory4?id=${list.su_id }">详情</a> | <a style="cursor: pointer;" href="over?id=${list.su_id }"> 完成</a> | <a style="cursor: pointer;" href="inventory1dele?id=${list.su_id }">删除</a></td>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="category" value="${list.su_id }"/>${list.su_id }</td>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="name" value="${list.su_date }"/>${list.su_date }</td>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="do_name" value="${list.state }"/>${list.state }</td>
			</tr>
		</c:forEach>
		<c:if test="${ pageNumber!=null }">
			<tr>
				<td colspan="7">
					<div class="pagelist">
						<a href="detection?pageNumber=1">首页</a>
						<%-- <%if(){} %> --%>
						<c:if test="${ 1 != pageNumber && pageNumber >0 }">
							<a href="inventory?pageNumber=${pageNumber-1 }">上一页</a>
						</c:if>
						
						<c:if test="${ 0 != pageNumber-1 && 1 != pageNumber-1 && pageNumber >0 }">
							...
						</c:if>
						
						<c:if test="${ 1 != pageNumber && pageNumber >0 }">
							<a href="inventory?pageNumber=${pageNumber-1 }">${pageNumber-1 }</a>
						</c:if>
						
						<a href="inventory?pageNumber=${pageNumber }">${pageNumber }</a>
						
						<c:if test="${ Pages != pageNumber && pageNumber >0 }">
							<a href="inventory?pageNumber=${pageNumber+1 }">${pageNumber+1 }</a>
						</c:if>
						
						<c:if test="${ Pages != pageNumber && Pages != pageNumber+1 && pageNumber >0 }">
							...
						</c:if>
						
						<c:if test="${Pages != pageNumber && pageNumber >0 }">
							<a href="inventory?pageNumber=${pageNumber+1 }">下一页</a>
						</c:if>
						
						<a href="inventory?pageNumber=${Pages }">尾页</a>
						第${pageNumber }页/共${Pages }页
					</div>
				</td>
			</tr>
		</c:if>
		</table>
	</div>
</body>
<script type="text/javascript">
function change(data){
	if(data==1){
		window.location="inventory";
	}
	if(data==2){
		window.location="inventory1";
	}
	if(data==3){
		window.location="inventory2";
	}
	if(data==4){
		window.location="inventory3";
	}
};
</script>
</html>